<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Eigen-unsupported: Eigen::IterScaling&lt; MatrixType_ &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="eigendoxy.css" rel="stylesheet" type="text/css">
<!--  -->
<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Eigen_Silly_Professor_64x64.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="http://eigen.tuxfamily.org">Eigen-unsupported</a>
   &#160;<span id="projectnumber">3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.svg"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classEigen_1_1IterScaling.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="classEigen_1_1IterScaling-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Eigen::IterScaling&lt; MatrixType_ &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename MatrixType_&gt;<br />
class Eigen::IterScaling&lt; MatrixType_ &gt;</h3>

<p>iterative scaling algorithm to equilibrate rows and column norms in matrices </p>
<p>This class can be used as a preprocessing tool to accelerate the convergence of iterative methods</p>
<p>This feature is useful to limit the pivoting amount during LU/ILU factorization The scaling strategy as presented here preserves the symmetry of the problem NOTE It is assumed that the matrix does not have empty row or column,</p>
<p>Example with key steps </p><div class="fragment"><div class="line"><a class="codeRef" href="../group__matrixtypedefs.html#ga8554c6170729f01c7572574837ecf618">VectorXd</a> x(n), b(n);</div>
<div class="line">SparseMatrix&lt;double&gt; A;</div>
<div class="line"><span class="comment">// fill A and b;</span></div>
<div class="line">IterScaling&lt;SparseMatrix&lt;double&gt; &gt; scal; </div>
<div class="line"><span class="comment">// Compute the left and right scaling vectors. The matrix is equilibrated at output</span></div>
<div class="line">scal.computeRef(A); </div>
<div class="line"><span class="comment">// Scale the right hand side</span></div>
<div class="line">b = scal.LeftScaling().cwiseProduct(b); </div>
<div class="line"><span class="comment">// Now, solve the equilibrated linear system with any available solver</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// Scale back the computed solution</span></div>
<div class="line">x = scal.RightScaling().cwiseProduct(x); </div>
<div class="ttc" id="agroup__matrixtypedefs_html_ga8554c6170729f01c7572574837ecf618"><div class="ttname"><a href="../group__matrixtypedefs.html#ga8554c6170729f01c7572574837ecf618">VectorXd</a></div><div class="ttdeci">Matrix&lt; double, Dynamic, 1 &gt; VectorXd</div></div>
</div><!-- fragment --><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">MatrixType_</td><td>the type of the matrix. It should be a real square sparsematrix</td></tr>
  </table>
  </dd>
</dl>
<p>References : D. Ruiz and B. Ucar, A Symmetry Preserving Algorithm for <a class="elRef" href="../classEigen_1_1Matrix.html">Matrix</a> Scaling, INRIA Research report RR-7552</p>
<dl class="section see"><dt>See also</dt><dd><a class="elRef" href="../classEigen_1_1IncompleteLUT.html">IncompleteLUT</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a20438dc249686aa7002e6b2ff1d69ac1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1IterScaling.html#a20438dc249686aa7002e6b2ff1d69ac1">compute</a> (const MatrixType &amp;mat)</td></tr>
<tr class="separator:a20438dc249686aa7002e6b2ff1d69ac1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4622fbf83a895d87bb93538279325715"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1IterScaling.html#a4622fbf83a895d87bb93538279325715">computeRef</a> (MatrixType &amp;mat)</td></tr>
<tr class="separator:a4622fbf83a895d87bb93538279325715"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d6f9626d1da7b4bf43bf883f890f40b"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../group__matrixtypedefs.html#ga8554c6170729f01c7572574837ecf618">VectorXd</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1IterScaling.html#a8d6f9626d1da7b4bf43bf883f890f40b">LeftScaling</a> ()</td></tr>
<tr class="separator:a8d6f9626d1da7b4bf43bf883f890f40b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a985b00f6db8c11e0222061bf6674013f"><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../group__matrixtypedefs.html#ga8554c6170729f01c7572574837ecf618">VectorXd</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1IterScaling.html#a985b00f6db8c11e0222061bf6674013f">RightScaling</a> ()</td></tr>
<tr class="separator:a985b00f6db8c11e0222061bf6674013f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16486601c80084f64814d8fc6046de99"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1IterScaling.html#a16486601c80084f64814d8fc6046de99">setTolerance</a> (double tol)</td></tr>
<tr class="separator:a16486601c80084f64814d8fc6046de99"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a20438dc249686aa7002e6b2ff1d69ac1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20438dc249686aa7002e6b2ff1d69ac1">&#9670;&nbsp;</a></span>compute()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classEigen_1_1IterScaling.html">Eigen::IterScaling</a>&lt; MatrixType_ &gt;::compute </td>
          <td>(</td>
          <td class="paramtype">const MatrixType &amp;&#160;</td>
          <td class="paramname"><em>mat</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Compute the left and right diagonal matrices to scale the input matrix <code>mat</code> </p>
<p>FIXME This algorithm will be modified such that the diagonal elements are permuted on the diagonal.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1IterScaling.html#a8d6f9626d1da7b4bf43bf883f890f40b">LeftScaling()</a> <a class="el" href="classEigen_1_1IterScaling.html#a985b00f6db8c11e0222061bf6674013f">RightScaling()</a> </dd></dl>

</div>
</div>
<a id="a4622fbf83a895d87bb93538279325715"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4622fbf83a895d87bb93538279325715">&#9670;&nbsp;</a></span>computeRef()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classEigen_1_1IterScaling.html">Eigen::IterScaling</a>&lt; MatrixType_ &gt;::computeRef </td>
          <td>(</td>
          <td class="paramtype">MatrixType &amp;&#160;</td>
          <td class="paramname"><em>mat</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Compute the left and right vectors to scale the vectors the input matrix is scaled with the computed vectors at output</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classEigen_1_1IterScaling.html#a20438dc249686aa7002e6b2ff1d69ac1">compute()</a> </dd></dl>

</div>
</div>
<a id="a8d6f9626d1da7b4bf43bf883f890f40b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d6f9626d1da7b4bf43bf883f890f40b">&#9670;&nbsp;</a></span>LeftScaling()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="../group__matrixtypedefs.html#ga8554c6170729f01c7572574837ecf618">VectorXd</a>&amp; <a class="el" href="classEigen_1_1IterScaling.html">Eigen::IterScaling</a>&lt; MatrixType_ &gt;::LeftScaling </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the vector to scale the rows of the matrix </p>

</div>
</div>
<a id="a985b00f6db8c11e0222061bf6674013f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a985b00f6db8c11e0222061bf6674013f">&#9670;&nbsp;</a></span>RightScaling()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="../group__matrixtypedefs.html#ga8554c6170729f01c7572574837ecf618">VectorXd</a>&amp; <a class="el" href="classEigen_1_1IterScaling.html">Eigen::IterScaling</a>&lt; MatrixType_ &gt;::RightScaling </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the vector to scale the columns of the matrix </p>

</div>
</div>
<a id="a16486601c80084f64814d8fc6046de99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16486601c80084f64814d8fc6046de99">&#9670;&nbsp;</a></span>setTolerance()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename MatrixType_ &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classEigen_1_1IterScaling.html">Eigen::IterScaling</a>&lt; MatrixType_ &gt;::setTolerance </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>tol</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set the tolerance for the convergence of the iterative scaling algorithm </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="Scaling_8h_source.html">Scaling.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceEigen.html">Eigen</a></li><li class="navelem"><a class="el" href="classEigen_1_1IterScaling.html">IterScaling</a></li>
    <li class="footer">Generated on Thu Apr 21 2022 13:08:00 for Eigen-unsupported by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
